deferred class Base
feature
    test
    do
        std_output.put_string("Hello world %N")
    end
end

deferred class IFACE
feature
    HelloWorld
    deferred 
    end
end


class Derived
inherit Base
        rename test As HelloWorld
inherit
        IFACE
       redefine HelloWorld
create make
feature
        make
        do
        end
end

class Derived1
inherit  Derived
         redefine HelloWorld
create
        md1
feature
        md1 do end
        HelloWorld
        do
            Precursor.HelloWorld
            std_output.put_string("From derived1 %N");
        end
end

class Derived2
inherit  Derived
         redefine HelloWorld
create
        md1
feature
        md1 do end
        HelloWorld
        do
            Precursor.HelloWorld
            std_output.put_string("From derived2 %N");
        end
end

class APP
feature
        INIT
        local
            a : ARRAY[IFACE]
            b,c,d : IFACE
            i : INTEGER
        do
           !Derived! b.make
           !Derived1! c.md1
           !Derived2! d.md1
           a:= << b ,c, d >>;
           from 
               i:=0
           until
                i=3
           loop
                a[i].HelloWorld()
                i:=i+1
           end
        end
end